<?php

use Sffi\ElementPlus\ElForm;
use Sffi\ElementPlus\entity\Option;
use Sffi\ElementPlus\ElForm\ElInput;
use Sffi\ElementPlus\ElForm\ElRadio;

require 'vendor/autoload.php';
$form = new ElForm();   //先新建一个表单类
$form->addColumn(new ElInput('昵称', 'nickname', '请填写您的昵称')); //向表单中添加列
$form->addColumn(new ElInput('头像连接', 'headimgurl', '请填写您的头像url'));
$botType = new ElRadio('登录方式', 'login_type');
$botType->addOptionByArgs('扫码', 'qrCode');
$botType->addOptionByArgs('验证码', 'validCode');
$botType->addOption(new Option('密码', 'password'));
$form->addColumn($botType);
$res = $form->__toArray();
var_dump($res);